﻿@model iKnow.Models.Article

@{
    ViewBag.Title = "Index";
}
@if (ViewBag.IsAuthenticated)
{
    <div id="editContainer">
        @Html.ActionLink("Edit", "Edit", new { id = Model.Title })
    </div>
    <div id="versionContainer">
        <span>Version: &nbsp;</span>
        @foreach (int version in ViewBag.Versions)
        {
            if (version == Model.Version)
            {
                <span><b>@version</b></span>
            }
            else
            {
                @Html.ActionLink(version.ToString(), "Index", new { id = Model.Title, version = version })
            }
        }
    </div>
    <div id="infoContainer">
        Edited by: <b>@Model.ChangedBy</b>
        <br />
        On: <b>@Model.Changed.ToString()</b>
    </div>
}

@(new HtmlString(Model.Text))